package cn.tpshion.devops.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Random;

public class IdUtil {

    public static String makeId() {
        DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
        return format.format(System.currentTimeMillis()) + createRandom();
    }

    private static String createRandom() {
        Random random = new Random();
        int randomNumber = random.nextInt(999999);
        return String.format("%06d", randomNumber);
    }

}
